Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.hw
Class Library.LibraryLoader

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          rdlc.hw.Library.LibraryLoader

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

Enclosing class:
  Library

    protected class Library.LibraryLoader

extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ErrorHandler

This class does the actual XML parsing and loading. It is separated from the main library because it is only needed to read the config file in.

Version:
  $Revision: 1.29 $
Author:
  Greg Gibeling

Field Summary
`static java.lang.String` | `ATTR_NAME` Attribute name for the element name.
`static java.lang.String` | `ATTR_PARAMGROUP` Attribute name for the parameter's parameter group.
`static java.lang.String` | `ATTR_PORTGROUP` Attribute name for the port group.
`static java.lang.String` | `ATTR_SOURCE` Attribute name for the source file.
`static java.lang.String` | `ATTR_STARTDONE` Attribute name for the startdone module flag.
`static java.lang.String` | `ATTR_VALUE` Attribute name for the parameter value.
`static java.lang.String` | `ATTR_WIDTH` Attribute name for the port width.
`protected java.lang.String` | `cdata` Accumulated CDATA.
`static java.lang.String` | `ELEM_ENGINE` Element name for a class which implements an engine.
`static java.lang.String` | `ELEM_FILE` Element name for a library file.
`static java.lang.String` | `ELEM_INOUT` Element name for a library module inout.
`static java.lang.String` | `ELEM_INPUT` Element name for a library module input.
`static java.lang.String` | `ELEM_LINK` Element name for a class which implements a link.
`static java.lang.String` | `ELEM_MODULE` Element name for a library module.
`static java.lang.String` | `ELEM_NAMESPACE` Element name for a namespace.
`static java.lang.String` | `ELEM_OUTPUT` Element name for a library module output.
`static java.lang.String` | `ELEM_PARAMETER` Element name for a library module parameter.
`static java.lang.String` | `ELEM_REQUIRES` Element name for a library module or file depedancy.
`static java.lang.String` | `ELEM_ROOT` Element name for the root namespace.
`protected LibraryModule` | `libModule` The library module we're in the process of loading.
`protected org.xml.sax.Locator` | `locator` Locator provided by the XML parser to get line numbers and such.
`protected Namespace` | `namespace` Current context namespace during XML parsing.
`protected java.lang.String` | `path` The path to the XML resource.
`protected java.lang.String` | `resourceName` The name of the XML resource.
`protected Namespace` | `rootNamespace` The root namespace of the hierarchy.

Constructor Summary
`Library.LibraryLoader(java.lang.String _resourceName, boolean tryResource, Namespace _rootNamespace, java.lang.String _schemaName, Log errorLog)` Standard constructor.

Method Summary
`void` | `characters(char[] buf, int offset, int len)` CData accumulation routine.
`void` | `endDocument()`
`void` | `endElement(java.lang.String URI, java.lang.String localName, java.lang.String qualifiedName)` Simple cleanup routine to handle the end of an element.
`void` | `error(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.
`void` | `fatalError(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.
`void` | `setDocumentLocator(org.xml.sax.Locator _locator)`
`void` | `startDocument()`
`void` | `startElement(java.lang.String URI, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)` Element start handler, responsible for creating namespaces, library modules and library files.
`void` | `warning(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ELEM_ROOT

    public static final java.lang.String ELEM_ROOT

  Element name for the root namespace.

  See Also:
    Constant Field Values

### ELEM_NAMESPACE

    public static final java.lang.String ELEM_NAMESPACE

  Element name for a namespace.

  See Also:
    Constant Field Values

### ELEM_MODULE

    public static final java.lang.String ELEM_MODULE

  Element name for a library module.

  See Also:
    Constant Field Values

### ELEM_FILE

    public static final java.lang.String ELEM_FILE

  Element name for a library file.

  See Also:
    Constant Field Values

### ELEM_LINK

    public static final java.lang.String ELEM_LINK

  Element name for a class which implements a link.

  See Also:
    Constant Field Values

### ELEM_ENGINE

    public static final java.lang.String ELEM_ENGINE

  Element name for a class which implements an engine.

  See Also:
    Constant Field Values

### ELEM_INPUT

    public static final java.lang.String ELEM_INPUT

  Element name for a library module input.

  See Also:
    Constant Field Values

### ELEM_OUTPUT

    public static final java.lang.String ELEM_OUTPUT

  Element name for a library module output.

  See Also:
    Constant Field Values

### ELEM_INOUT

    public static final java.lang.String ELEM_INOUT

  Element name for a library module inout.

  See Also:
    Constant Field Values

### ELEM_PARAMETER

    public static final java.lang.String ELEM_PARAMETER

  Element name for a library module parameter.

  See Also:
    Constant Field Values

### ELEM_REQUIRES

    public static final java.lang.String ELEM_REQUIRES

  Element name for a library module or file depedancy.

  See Also:
    Constant Field Values

### ATTR_NAME

    public static final java.lang.String ATTR_NAME

  Attribute name for the element name.

  See Also:
    Constant Field Values

### ATTR_SOURCE

    public static final java.lang.String ATTR_SOURCE

  Attribute name for the source file.

  See Also:
    Constant Field Values

### ATTR_PORTGROUP

    public static final java.lang.String ATTR_PORTGROUP

  Attribute name for the port group.

  See Also:
    Constant Field Values

### ATTR_PARAMGROUP

    public static final java.lang.String ATTR_PARAMGROUP

  Attribute name for the parameter's parameter group.

  See Also:
    Constant Field Values

### ATTR_WIDTH

    public static final java.lang.String ATTR_WIDTH

  Attribute name for the port width.

  See Also:
    Constant Field Values

### ATTR_VALUE

    public static final java.lang.String ATTR_VALUE

  Attribute name for the parameter value.

  See Also:
    Constant Field Values

### ATTR_STARTDONE

    public static final java.lang.String ATTR_STARTDONE

  Attribute name for the startdone module flag.

  See Also:
    Constant Field Values

### locator

    protected org.xml.sax.Locator locator

  Locator provided by the XML parser to get line numbers and such.

### path

    protected java.lang.String path

  The path to the XML resource.

### resourceName

    protected java.lang.String resourceName

  The name of the XML resource.

### namespace

    protected Namespace namespace

  Current context namespace during XML parsing.

### libModule

    protected LibraryModule libModule

  The library module we're in the process of loading.

### rootNamespace

    protected Namespace rootNamespace

  The root namespace of the hierarchy.

### cdata

    protected java.lang.String cdata

  Accumulated CDATA.

Constructor Detail

### Library.LibraryLoader

    public Library.LibraryLoader(java.lang.String _resourceName,
                                 boolean tryResource,
                                 Namespace _rootNamespace,
                                 java.lang.String _schemaName,
                                 Log errorLog)

  Standard constructor. Simply loads the configuration file.

  Parameters:
    `_resourceName` - The name of the resource to load as the config file.
    `tryResource` - Should the resource name be loaded as an actual resource? (as opposed to using it as a file name only).
    `_rootNamespace` - The root namespace to merge the root namespace of the file into
    `_schemaName` - The name of the resource containing the XML schema. This is always a resource, never a file.
    `errorLog` - A list of errors to be reported to the user.

Method Detail

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator _locator)

  Specified by:
    `setDocumentLocator` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `setDocumentLocator` in class `org.xml.sax.helpers.DefaultHandler`
  See Also:
    `DefaultHandler.setDocumentLocator(org.xml.sax.Locator)`

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.startDocument()`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Specified by:
    `endDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.endDocument()`

### startElement

    public void startElement(java.lang.String URI,
                             java.lang.String localName,
                             java.lang.String qualifiedName,
                             org.xml.sax.Attributes attributes)
                      throws org.xml.sax.SAXException

  Element start handler, responsible for creating namespaces, library modules and library files. Also responsible for populating requirements, ports and parameters. In addition this method is responsible for loading link and engine generator classes.

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)`

### endElement

    public void endElement(java.lang.String URI,
                           java.lang.String localName,
                           java.lang.String qualifiedName)
                    throws org.xml.sax.SAXException

  Simple cleanup routine to handle the end of an element. Handles requirement parsing.

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)`

### characters

    public void characters(char[] buf,
                           int offset,
                           int len)
                    throws org.xml.sax.SAXException

  CData accumulation routine.

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.characters(char[], int, int)`

### error

    public void error(org.xml.sax.SAXParseException exception)
               throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.error(org.xml.sax.SAXParseException)`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException exception)
                    throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.fatalError(org.xml.sax.SAXParseException)`

### warning

    public void warning(org.xml.sax.SAXParseException exception)
                 throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.warning(org.xml.sax.SAXParseException)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD